import express from 'express';
import { MarketingController } from '../controllers/marketingController.js';
import { authenticateToken } from '../middleware/auth.js';

const router = express.Router();
const marketingController = new MarketingController();

// 获取市场部列表
router.get('/', marketingController.getMarketingDepartments.bind(marketingController));

// 创建市场部
router.post('/', marketingController.createMarketingDepartment.bind(marketingController));

// 更新市场部
router.put('/:id', marketingController.updateMarketingDepartment.bind(marketingController));

// 删除市场部
router.delete('/:id', marketingController.deleteMarketingDepartment.bind(marketingController));

export default router;